package com.green.di.controller;

import com.green.di.service.IPersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PersonController {

    @Autowired
    private IPersonService personService;

    @GetMapping("insert")
    public String insertPerson() {
        return personService.addPerson() > 0 ? "添加成功" : "添加失败";
    }
}
